﻿@namespace MudBlazor.Docs.Examples

<MudMenu Label="Open menu" @bind-Open="_open">
    <MudMenuItem Label="Item 1" />
    <MudMenuItem Label="Item 2" />
    <MudMenuItem Label="Item 3" />
</MudMenu>

<MudButton Color="Color.Primary" OnClick="OnOpen">Open for 1 second</MudButton>
<MudSwitch Color="Color.Primary" @bind-Value="_open" Label="Open" />

@code {
    private bool _open;

    private async Task OnOpen()
    {
        _open = true;
        await Task.Delay(1000);
        _open = false;
    }
}
